package ruifeng.zcj.dig.ui.forum.parts;

import java.util.ArrayList;

import ruifeng.zcj.dig.base.tablayoutview.IFragmentPresenter;
import ruifeng.zcj.dig.base.tablayoutview.TabLayoutFragment;
import ruifeng.zcj.dig.base.tablayoutview.TabLayoutPresenter;
import ruifeng.zcj.mybase.base.BaseActivity;
import ruifeng.zcj.mybase.base.BaseFragment;

/**
 * Created by Administrator on 2016/10/24 0024.
 */
public class PartsMainPresenter extends TabLayoutPresenter implements IFragmentPresenter {
    public static final String NEWEST_FILM = "newest_film";
    public static final String DOMESTIC_FILM = "domestic_film";
    public static final String EUROPE_AMERICA_FILM = "europe_america_film";
    public static final String JAPAN_SOUTH_KOREA_FILM = "japan_south_korea_film";


    public PartsMainPresenter(BaseActivity baseActivity, BaseFragment baseFragment, TabLayoutFragment filmMainIView) {
        super(baseActivity, baseFragment, filmMainIView);
    }


    @Override
    public BaseFragment newFragment(StripTabItem stripTabItem) {
        switch (stripTabItem.getType()) {
            case NEWEST_FILM:
                return CityFragment.newInstance();
           /* case DOMESTIC_FILM:
                return CityFragment.newInstance();
            case EUROPE_AMERICA_FILM:
                return CityFragment.newInstance();
            case JAPAN_SOUTH_KOREA_FILM:
                return CityFragment.newInstance();*/
        }
        return CityFragment.newInstance();
    }

    @Override
    public ArrayList<StripTabItem> generateTabs() {
        ArrayList<StripTabItem> items = new ArrayList<>();
        items.add(new StripTabItem(NEWEST_FILM, "武汉"));
       /* items.add(new StripTabItem(DOMESTIC_FILM, "北京"));
        items.add(new StripTabItem(EUROPE_AMERICA_FILM, "上海"));
        items.add(new StripTabItem(JAPAN_SOUTH_KOREA_FILM, "河北"));*/
        return items;
    }
}
